package com.gs.wzmanager.service.impl;

import com.gs.wzmanager.dao.ResourceDao;
import com.gs.wzmanager.entity.Resource;
import com.gs.wzmanager.service.ResourceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ResourceServiceImpl implements ResourceService{

    private Logger logger = LoggerFactory.getLogger(ResourceServiceImpl.class);

    @Autowired
    private ResourceDao resourceDao;
    public void addResource(Resource res) {
        resourceDao.addResource(res);
    }

    public void updateResource(Resource res) {
        resourceDao.updateResource(res);
    }

    public List<Resource> queryAllResource() {
        return resourceDao.queryAllResource();
    }

    public void deleteResourceById(int id) {
        resourceDao.deleteResourceById(id);
    }


    public Resource queryResourceById(int id) {
        return resourceDao.queryResourceById(id);
    }
}
